package main

import "fmt"

func reverse(s []int) {
	for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
		s[i], s[j] = s[j], s[i]
	}
}

func main() {
	months := [...]string{1: "January", "Feburay", "Wednesdasy", "Thursday", "Friday"}
	for i, v := range months {
		fmt.Println(i, v)
	}
	is := [...]int{1, 2, 3, 4, 5}
	fmt.Println(is)
	reverse(is[:])
	fmt.Println(is)

	var s []int    // len(s) == 0, s == nil
	s = nil        // len(s) == 0, s == nil
	s = []int(nil) // len(s) == 0, s == nil
	s = []int{}    // len(s) == 0, s != nil
	fmt.Println(s)

	var runes []rune
	for _, v := range "Hello, 世界" {
		runes = append(runes, v)
	}
	fmt.Println(runes)
	fmt.Printf("%q\n", runes)
}
